package com.project.mapper;

import com.project.bean.CutPageBean;
import com.project.bean.StudentBean;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface IStudentMapper {
    public void add(StudentBean student);
    public void update(@Param("sid") int id,@Param("newTel") String tel);
    public List<StudentBean> findByName(@Param("name") String name);
    public StudentBean findById(int id);
    public List<StudentBean> findByBirthday(@Param("startDate") LocalDate startDate,@Param("endDate") LocalDate endDate);
    public void addMore(@Param("slist") List<StudentBean> list);
    public List<StudentBean> findByItem(@Param("name") String name,
              @Param("startDate") LocalDate startDate,@Param("endDate") LocalDate endDate);

    public List<StudentBean> cutAllList(@Param("start") int start,@Param("pageSize") int pageSize);
    public int cutAllCount();
    public  List<StudentBean> cutByItem(@Param("start") int start,@Param("pageSize") int pageSize,
                   @Param("name") String name, @Param("startDate") LocalDate startDate,@Param("endDate") LocalDate endDate);
    public  int cutByCount( @Param("name") String name, @Param("startDate") LocalDate startDate,@Param("endDate") LocalDate endDate);
}
